import request from '@/utils/request'
import qs from 'qs'

/**
 * 我的日报
 * 查询员工
 * 入参名称：username
 */
export function getUserInfoList(code) {
  return request({
    url: '/api/admin/user/getUserInfoList?' + qs.stringify(code),
    method: 'get'
  })
}

/**
 * Data报表
 */
export function getData(code) {
  return request({
    url: '/api/admin/projectData/getDataStatement?' + qs.stringify(code),
    method: 'get'
  })
}


/**
 * 更新合约收入(成本)本年度的数据
 */
export function updateRecognized(obj) {
  return request({
    url: '/api/admin/projectData/updateRecognized',
    method: 'post',
    data: obj
  })
}

/**
 * 更新能专成本的数据
 */
export function updateProjectAbilityCost(obj) {
  return request({
    url: '/api/admin/projectData/updateProjectAbilityCost',
    method: 'post',
    data: obj
  })
}

/**
 * 修改合约收入(成本)本年度的数据
 */
export function editRecognized(obj) {
  return request({
    url: '/api/admin/projectData/editRecognized',
    method: 'post',
    data: obj
  })
}

/**
 * 查询表格可显示的栏位
 */
export function queryDisplayBlock(query) {
  return request({
    url: '/api/admin/tableDisplay/queryDisplayBlock',
    method: 'get',
    params: query
  })
}

/**
 * 保存表格可显示的栏位
 */
export function saveDisplayBlock(list) {
  return request({
    url: '/api/admin/tableDisplay/saveDisplayBlock',
    method: 'post',
    data: list
  })
}

/**
 * Overall报表
 */
export function getDataOverall(list) {
  return request({
    url: '/api/admin/projectData/getDataOverall?' + qs.stringify(list),
    method: 'get'
  })
}

/**
 * COO报表
 */
export function getDataCOO(list) {
  return request({
    url: '/api/admin/projectData/getDataCOO?' + qs.stringify(list),
    method: 'get'
  })
}

/**
 * 查询data编辑表
 */
export function getProjectDataEdit(list) {
  return request({
    url: '/api/admin/projectData/getProjectDataEdit?' + qs.stringify(list),
    method: 'get'
  })
}

/**
 * 新增修改data编辑表
 */
export function insertProjectDataEditList(list) {
  return request({
    url: '/api/admin/projectData/insertProjectDataEditList',
    method: 'post',
    data: list
  })
}

/**
 * 批量修改data编辑表
 */
export function savaProjectDataEditList(list) {
  return request({
    url: '/api/admin/projectData/savaProjectDataEditList',
    method: 'post',
    data: list
  })
}

/**
 * 批量删除data编辑表
 */
export function deleteProjectDataEditList(list) {
  return request({
    url: '/api/admin/projectData/deleteProjectDataEditList',
    method: 'delete',
    data: list
  })
}



